package cn.heima.cn;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Set;

public class StudentDemo {
    public static void main(String[] args) {
        Map<String ,String > map = new HashMap<>();
        map.put("heima001","xiaomei");
        map.put("heima002","xiaohuang");
        map.put("heima002","xiaohuang");
        map.put("heima003","xiaozs");
      /*  boolean  flay =map.containsKey("heima003");
        boolean flay1 = map.containsValue("xiaohuang");
        System.out.println(flay);
        System.out.println(flay1);
        boolean empty = map.isEmpty();
        System.out.println(empty);*/
        Set<Map.Entry<String, String>> en = map.entrySet();
        for (Map.Entry<String, String> stringStringEntry : en) {
            System.out.println(stringStringEntry.getKey()+"-->"+stringStringEntry.getValue());
        }
        System.out.println("-----------");
        Set<String> s = map.keySet();
        for (String s1 : s) {

            System.out.println(s1+"--->"+ map.get(s1));
        }

    }

}
